<?php

$con=mysqli_connect("localhost","root","admin");
// Check connection
if (mysqli_connect_errno())
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }

// Create table
$sql= "CREATE TABLE HOPEWw.Child(
  child_ID INT NOT NULL AUTO_INCREMENT,
  ECD_code INT NOT NULL,
  child_Name VARCHAR(20) NOT NULL,
  child_Surname VARCHAR(40) NOT NULL,
  child_dob DATE NOT NULL,
  child_Gender VARCHAR (1) NOT NULL,
  child_isOrphan VARCHAR(3) NOT NULL,
  child_CSI_score INT,
  
  
  
  PRIMARY KEY (child_ID )
   )";
// Execute query
if (mysqli_query($con,$sql))
  {
  echo "Table Child created successfully";
  }
else
  {
  echo "Error creating table: " . mysqli_error($con);
  }
?>
